<html>
<body>
<pre>
package project3;

import lex.Lex;
import lex.TokenType;
import lex.Token;


abstract public class DatalogSegment
    extends List
{
//Domain Implementations
//  ArrayList<Node> nodes; -- inherited from List

    <a name="name"/>
    protected String name;

//Constructor
    <a name="StdConstructor"/>
    public DatalogSegment(Lex lex, TokenType expectedTokenType)
        throws ParserException 
    {
        Token token = checkFor(lex, expectedTokenType);
        name = token.getValue();
        checkFor(lex, TokenType.COLON);
        createList(lex);
    }

//Queries
    <a name="toString"/>
    public String toString()
    {
        StringBuffer result = new StringBuffer();
        result.append(name);
        result.append(":"); 
        result.append(System.getProperty("line.separator"));
        result.append(super.toString());
        return result.toString();
    }
}
</pre>
</body>
</html>
